<%# locals: (user:) %>
<% if Errbit::Config.github_authentication && user == current_user %>
  <span class="github">
    <% if user.github_account? %>
      <%= link_to "Unlink #{Errbit::Config.github_site_title} account",
                  user_unlink_github_path(user),
                  method: :patch,
                  data: { confirm: "Are you sure?" } %>
    <% else %>
      <%= link_to "Link #{Errbit::Config.github_site_title} account",
                  user_github_omniauth_authorize_path,
                  method: :post %>
    <% end %>
  </span>
<% end %>
